d10e163a67923e10247aa242b7463122e7e5b92c,sonar-batch/src/test/java/org/sonar/batch/index/SourcePersisterTest.java,SourcePersisterTest,testPersistNewFileWithScmAndHighlighting,#,169
Before Change
SyntaxHighlightingData highlighting = new SyntaxHighlightingData(Arrays.asList(
SyntaxHighlightingRule.create(0, 3, TypeOfText.ANNOTATION),
SyntaxHighlightingRule.create(4, 5, TypeOfText.COMMENT),
SyntaxHighlightingRule.create(7, 16, TypeOfText.CONSTANT)
));
when(componentDataCache.getData(PROJECT_KEY + ":" + relativePathNew, SnapshotDataTypes.SYNTAX_HIGHLIGHTING))
After Change
SyntaxHighlightingData highlighting = new SyntaxHighlightingDataBuilder()
.registerHighlightingRule(0, 3, TypeOfText.ANNOTATION)
.registerHighlightingRule(4, 5, TypeOfText.COMMENT)
.registerHighlightingRule(7, 16, TypeOfText.CONSTANT)
.build();
when(componentDataCache.getData(PROJECT_KEY + ":" + relativePathNew, SnapshotDataTypes.SYNTAX_HIGHLIGHTING))
.thenReturn(highlighting);